import App from './App'
import * as Pinia from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import modal from '@/utils/modal.js' // plugins

import uviewPlus from '@/uni_modules/uview-plus'


import { createSSRApp } from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	app.use(uviewPlus)
	// 使用pinia
	const _pinia = Pinia.createPinia()
	_pinia.use(piniaPluginPersistedstate)
	app.use(_pinia);
	return {
		app,
		Pinia, // 此处必须将 Pinia 返回
	}
}